<template name="Gift">
    {{#if gift.header_img.path}}
    <div class="f7-gift-header">
        <img src="{{gift.header_img.path}}" alt="" width="100%" height="100%">
    </div>
    {{/if}}

    {{#if gift.coupons}}
    <div class="f7-gift-content"> 
        <div class="f7-gift-content-top">
            <div><span>可领的券</span></div>
            <div><button class="f7-gift-button" id="button">全部领取</button></div>    
        </div>
        
        <div class="f7-gift-content-content">
            {{#each gift.coupons}}
            <div class="x7-card-package">
                <div class="x7-card-info">
                    <div class="x7-card-style">
                        <img src="/img/card/card_style.png" height="30px" width="100px"/>
                        <div class="x7-card-category">
                           {{coutype coupon_type}}
                        </div> 
                    </div>

                    <div class="x7-card-content">
                        <div class="x7-card-title">
                            <span class="x7-card-name">{{merchant_name}}</span>
                            <span class="x7-card-price">
                                {{couponDetail rule_detail}}
                            </span>
                            {{#if is_coupon}}
                            <div class="f7-card-state">
                                <span class="f7-card-font">已领取</span>
                            </div>
                            {{else}}
                            <div class="x7-card-state" id="selected">
                                <span class="x7-card-font" id="{{id}}">点击领取</span>
                            </div>
                            {{/if}}
                        </div>
                        <div class="x7-card-subtitle">
                            <span class="x7-card-subname"></span>
                             <span class="x7-card-subprice">
                                 {{#if rule_detail.cut}}
                                 满{{rule_detail.full}}元可用
                                 {{/if}}
                            </span> 
                        </div>
                    <div class="x7-card-border-bottomleft"></div>
                    <div class="x7-card-border-bottomright"></div>
                    </div>
                </div>
                <div class="x7-card-subinfo">
                    <div class="x7-card-border-topleft"></div>
                    <div class="x7-card-border-topright"></div> 
                    <span class="x7-card-left">使用期限：{{getLocalTime start_time}}&nbsp;~&nbsp;{{getLocalTime end_time}}</span>
                </div>
            </div>
            {{/each}}
        </div>
    </div>
    {{/if}}
</template>
